home *** CD-ROM | disk | FTP | other *** search
- module oWF_UploadToolPlugin is cWF_PluginList
- ---------------------------------------------
- with
- Items is [
- oWF_UploadTool
- ];
- end;
-
- object oWF_UploadTool is cWF_UploadPlugin
- has
- ActivateTool()
- do
- self.SinglePageFlag := false;
- self.DeleteFlag := true;
- end;
-
- DoUpload()
- do
- -- Projekt gewèhlt?
- if (oWF_Main.PageManager.ActiveProject <> void) then
- if (self.IsUserDataOK()) then
- -- Wenn das gesamte Projekt gespeichert wird, warne wenn keine Startseite gesetzt ist
- if ((oWF_Main.PageManager.ActiveProject.GetStartPage() = void) and not(self.SinglePageFlag)) then
- oWF_Main.Message(self, DoUpload_OK1, self, DoUpload_Cancel, 2606);
- else
- self.DoUpload_OK1();
- end;
- else
- oWF_Main.Alert(2603, self.ErrorMessage);
- self.ErrorMessage := "";
- end;
- else
- oWF_Main.Alert(2705);
- end;
- end;
-
- DoUpload_Cancel()
- do
- end;
-
- DoUpload_OK1()
- use
- aStartPage;
- aReport;
- aDeleteWarning;
- aServer; aPath; aUser; aCode;
- do
- if (self.SinglePageFlag) then
- aStartPage := oWF_Main.HTMLManager.PrepareUploadCurrentPage();
- else
- aStartPage := oWF_Main.HTMLManager.PrepareUploadCurrentProject();
- end;
- -- Fehler beim Speichern?
- if not(aStartPage = void) then
- if (self.DeleteFlag) then
- aDeleteWarning := oWF_Main.GetText(2608, (oWF_Main.GetText(2602))) + "\$0D\$0D";
- else
- aDeleteWarning := "";
- end;
- aServer := self.GetServer();
- aPath := self.GetServerPath();
- if (aPath.Count() = 0) then
- aPath := oWF_Main.GetText(2609);
- end;
- aUser := self.GetUserName();
- if (aUser.Count() = 0) then
- aPath := oWF_Main.GetText(2609);
- end;
- aCode := oWF_Main.IfVoid(self.UserCode, "");
- if (aCode.Count() = 0) then
- aCode := oWF_Main.GetText(2609);
- end;
- aReport := oWF_Main.GetText(2607, aServer, aPath, aUser, aCode, aDeleteWarning);
- oWF_Main.Message(self, DoUpload_OK2, self, DoUpload_Cancel, aReport);
- end;
- end;
-
- DoUpload_OK2()
- do
- oWF_Main.HTMLManager.LaunchUpload(self);
- end;
-
- -------------------------
- -- Benutzerdaten-Kontrolle
- -------------------------
-
- ErrorMessage;
-
- IsServerOK()
- do
- result := false;
- if ((self.GetServer()).Count() = 0) then
- self.ErrorMessage := oWF_Main.GetText(2604) + "\$0D\$0D";
- else if (oKR_String.CountChar((self.GetServer()), '.') < 2) then
- self.ErrorMessage := oWF_Main.GetText(2605) + "\$0D\$0D";
- else
- result := true;
- end;
- end;
-
- IsServerPathOK()
- do
- result := true;
- end;
-
- IsUserCodeOK()
- do
- result := true;
- end;
-
- IsUserNameOK()
- do
- result := true;
- end;
-
- IsUserDataOK()
- do
- self.ErrorMessage := "";
- result := (self.IsServerOK() and self.IsServerPathOK() and self.IsUserCodeOK() and self.IsUserNameOK());
- end;
- with
- ErrorMessage is "";
- ParameterList is [
- [oP_Boolean, 2702, GetSinglePageFlag, SetSinglePageFlag],
- [oP_Boolean, 2602, GetDeleteFlag, SetDeleteFlag],
- [oP_Boolean, 2611, GetHTMLExtensionFlag, SetHTMLExtensionFlag],
- [oP_Separator],
- [oP_Text200, 2901, GetServer, SetServer],
- [oP_Separator],
- [oP_BigText50, 2902, GetServerPath, SetServerPath],
- [oP_Separator],
- [oP_Text200, 2903, GetUserName, SetUserName],
- [oP_Separator],
- [oP_Text200, 2904, GetUserCode, SetUserCode],
- [oP_Separator],
- [oP_Button180, 2601, DoUpload],
- [oP_End]
- ];
- ParameterHeadline is 2600;
- -----------------------------------------------------------
- PrefsFieldList is [Server, ServerPath, UserName];
- PrefsNameList is ["Server", "ServerPath", "UserName"];
- PrefsTypeList is [void, void, void];
- -----------------------------------------------------------
- WFName is "UploadTool";
- Version is 200;
- ValidApplication is [gWF_Go, gWF_Go_Retail, gWF_Extreme];
- ValidVersion is [200, 200, 200];
- ValidLicensed is false;
- Validationcode is 110247621; -------------
-
- ValidRooms is [oWF_Upload];
-
- GUIElement is "./UploadTool.pic";
- GUICells is 7;
- HelpTextID is 5023;
- HelpURL is "./up.htm";
- end;
-